<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
  <link rel="stylesheet" href="/css/index.css">
  <meta charset="UTF-8">
  <title>profile</title>
</head>
<body>


<div class="error"
      th:if="${#fields.hasErrors('profileForm.name')}"
      th:errors="*{profileForm.name}">Name Error</div>

<div class="error"
      th:if="${#fields.hasErrors('profileForm.email')}"
      th:errors="*{profileForm.email}">email Error</div>

<div class="error"
     th:if="${#fields.hasErrors('profileForm.date')}"
     th:errors="*{profileForm.date}">date Error</div>


<form th:action="@{/profile}" method="post" th:object="${profileForm}">
  <div>
    <label for="name">name</label>
    <input type="text" id="name" th:field="${profileForm.name}" >
  </div>

  <div>
    <label for="email">email</label>
    <input type="text" id="email" th:field="${profileForm.email}">
  </div>

  <div>
    <label for="date">date</label>
    <input type="text" id="date" th:field="${profileForm.date}">
  </div>
  <button type="submit">submit</button>

</form>



</body>
</html>